﻿#if UNITY_EDITOR
using UnityEditor.Animations;

/// <summary>
/// Animator ControllerLayer
/// </summary>
public class ESF_SkillAnimatorControllerLayer
{
    /// <summary>
    /// Layer层级
    /// </summary>
    public AnimatorControllerLayer layer { get; private set; }

    /// <summary>
    /// 索引
    /// </summary>
    public int layerIndex { get; private set; }

    /// <summary>
    /// Layer枚举名称带索引
    /// </summary>
    public string enLayerNameIndex { get; private set; }

    /// <summary>
    /// Layer枚举名称
    /// </summary>
    public string enLayerName { get; private set; }

    /// <summary>
    /// 名称
    /// </summary>
    public int hashCode { get { return enLayerNameIndex.GetHashCode(); } }

    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="_layer">Layer</param>
    /// <param name="_layerIndex">索引</param>
    public ESF_SkillAnimatorControllerLayer(AnimatorControllerLayer _layer, int _layerIndex)
    {
        layer = _layer;
        layerIndex = _layerIndex;
        enLayerName = $"{layer.name}".ESF_OnlyCNUAndOtherReplaceU();
        enLayerNameIndex = $"{layer.name}_{_layerIndex}".ESF_OnlyCNUAndOtherReplaceU();
    }
}

#endif
